@extends('admin.mainlayout')
@section('js')

@endsection
@section('content')
	<div class="main-wrap">
	<div class="crumb-wrap">
		<div class="crumb-list"><i class="icon-font"></i><a href="">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">第三方充值记录</span></div>
	</div>
	<!-- <div class="search-wrap">
        <div class="search-content">
            <div class="search-wrap">
                <div class="search-content">
                    <form action="{:U('Pay/payByMan')}" method="post">
                        <table class="search-tab">
                            <tr>
                                <th width="120">选择分类:</th>
                                <td>
                                    <select name="status" id="">
                                        <option value="">全部</option>
                                        <option value="0">未付款</option>
                                        <option value="1">充值成功</option>
                                        <option value="2">充值失败</option>
                                        <option value="3">已失效</option>
                                    </select>
                                </td>
                                <th width="70">汇款人:</th>
                                <td><input class="common-text" placeholder="汇款人" name="member_name" value="" id="" type="text"></td>
                                <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div> -->
	<div class="panel-actions" style="height:50px;">
		<h1 class="fl" style="line-height:50px; margin-left:20px;">
			<i class="icon-font"></i>
			数据统计状况
		</h1>
		<form action="" method="post" class="form-inline form-search" style="fr">
			<div class="fr" style="line-height:50px;">
				<input type="text" name="userid" value=""  class="form-control search-query" style="width:20%;" placeholder="会员id" title="会员id" />
				<input type="text" name="stime" class="stime" placeholder="开始时间：如2016-03-22" title="开始时间" readonly="" style="margin-right:20px;" onclick="laydate()">
				<input type="text" name="etime" class="etime" placeholder="结束时间：如2016-04-21" title="结束时间" readonly="" style="margin-right:20px;" onclick="laydate()">

				<input type="submit" id="submit" class="btn btn-primary" value="搜索" data-loading="稍候..." style="margin-right:20px;">
			</div>
		</form>
	</div>
	<div class="result-wrap">
		<!--余额统计-->
		<form name="myform" id="myform" method="post"></form>
		<div class="result-tab">

			<div class="panel-actions" style="height:50px;">
				<h1 class="fl" style="line-height:50px; margin-left:20px;">
					<i class="icon-font"></i>
					推广统计状况
				</h1>
				<form action="" method="get" class="form-inline form-search" style="fr">
					<div class="fr" style="line-height:50px;">
						<!-- <input type="text" name="userid" value=""  class="form-control search-query" style="width:20%;" placeholder="会员id" title="会员id" /> -->
						<input type="text" name="stime" class="stime" placeholder="开始时间：如2016-03-22" title="开始时间" readonly="" style="margin-right:20px;" onclick="laydate()">
						<input type="text" name="etime" class="etime" placeholder="结束时间：如2016-04-21" title="结束时间" readonly="" style="margin-right:20px;" onclick="laydate()">

						<input type="submit" id="submit" class="btn btn-primary" value="搜索" data-loading="稍候..." style="margin-right:20px;">
					</div>
				</form>
			</div>

			<div class="" style="overflow:hidden;">
				<div class="fl" style="padding-bottom:10px; width:56%; margin-left:15px;">
					<strong>
						余额统计
					</strong>
					<table class="table table-hover table-striped table-bordered" style="width:100%; border: 1px solid #ddd;">
						<thead>
						<tr>
							<th class="text-center w-100px">币种</th>
							<th class="text-center w-200px">总余额</th>
							<th class="text-center w-300px">3684余额</th>
							<th class="text-center w-300px">实际余额</th>
						</tr>
						</thead>
						<tbody>
							@foreach($alltj as $v)
							<tr>
								<td class="text-right ">{{$v['paytj']['currency']['currency_mark']}}</td>
								<td class="text-right">{{isset($v['paytj']['allnum'])?$v['paytj']['allnum']:0}}</td>
								<td class="text-right"></td>
								<td class="text-right">{{isset($v['paytj']['allnum'])?$v['paytj']['allnum']:0}}</td>
							</tr>
							@endforeach
						</tbody>
					</table>
				</div>
				<!--冻结统计-->
				<div class="fl" style="padding-bottom:10px; width:40%; margin-left:10px;">
					<strong>
						冻结统计
					</strong>
					<table class="table table-hover table-striped table-bordered" style="width:100%;border: 1px solid #ddd;">
						<thead>
						<tr>
							<th class="text-center w-100px">币种</th>
							<th class="text-center w-200px">冻结统计</th>
							<th class="text-center w-300px">3684冻结</th>
							<th class="text-center w-300px">实际冻结</th>
						</tr>
						</thead>
						<tbody>
							@foreach($alltj as $v)
							<tr>
								<td class="text-right ">{{$v['paytj']['currency']['currency_mark']}}</td>
								<td class="text-right">{{isset($v['paytj']['allcoldnum'])?$v['paytj']['allcoldnum']:0}}</td>
								<td class="text-right"></td>
								<td class="text-right">{{isset($v['paytj']['allcoldnum'])?$v['paytj']['allcoldnum']:0}}</td>
							</tr>
							@endforeach
						</tbody>
					</table>
				</div>
			</div>
			<!--用户余额-->
			<div class="" style="overflow:hidden;">
				<div class="fl" style="padding-bottom:10px; width:56%; margin-left:15px;">
					<strong>
						用户余额
					</strong>
					<table class="table table-hover table-striped table-bordered" style="width:100%; border: 1px solid #ddd;">
						<thead>
						<tr>
							<th class="text-center w-100px">币种</th>
							<th class="text-center w-200px">用户余额</th>
							<th class="text-center w-300px">用户冻结</th>
						</tr>
						</thead>
						<tbody>
							@foreach($alltj as $v)
							<tr>
								<td class="text-right ">{{$v['membertj']['currency']['currency_mark']}}</td>
								<td class="text-right">{{isset($v['membertj']['allnum'])?$v['membertj']['allnum']:0}}</td>
								<td class="text-right">{{isset($v['membertj']['allcoldnum'])?$v['membertj']['allcoldnum']:0}}</td>
							</tr>
							@endforeach
						</tbody>

					</table>
				</div>
				<!--充值提现-->
				<div class="fl" style="padding-bottom:10px; width:40%; margin-left:10px;">
					<strong>
						充值提现
					</strong>
					<table class="table table-hover table-striped table-bordered" style="width:100%;border: 1px solid #ddd;">
						<thead>
						<tr>
							<th class="text-center w-100px">币种</th>
							<th class="text-center w-200px">充值</th>
							<th class="text-center w-300px">提现</th>
							<th class="text-center w-300px">交易</th>
						</tr>
						</thead>
						<tbody>
							@foreach($alltj as $v)
							<tr>
								<td class="text-right ">{{$v['cztxtj']['currency']['currency_mark']}}</td>
								<td class="text-right">{{$v['cztxtj']['txmoney']['txmoney']}}</td>
								<td class="text-right">{{$v['cztxtj']['czmoney']['czmoney']}}</td>
								<td class="text-right">{{$v['cztxtj']['jymoney']['jymoney']}}</td>
							</tr>
							@endforeach

						</tbody>
					</table>
				</div>
			</div>
			<!--挂单交易-->
			<div style="overflow:hidden;">
				<div style="padding-bottom:10px; width:97%; clear:both; margin-left:15px;">
					<strong>
						挂单交易
					</strong>
					<table class="table table-hover table-striped table-bordered" style="width:100%;border: 1px solid #ddd;">
						<thead>
						<tr>
							<th class="text-center w-80px">交易类型</th>
							<th class="text-center w-80px">买入挂单量</th>
							<th class="text-center w-80px">买入挂单额</th>
							<th class="text-center w-80px">卖出挂单量</th>
							<th class="text-center w-80px">卖出挂单额</th>
							<th class="text-center w-80px">买入交易量</th>
							<th class="text-center w-80px">买入交易额</th>
							<th class="text-center w-80px">卖出交易量</th>
							<th class="text-center w-80px">卖出交易额</th>
						</tr>
						</thead>
						<tbody>

							@foreach($list as $key=>$v)
							<tr>
								<td class="text-right ">{{$v['currency']['currency_mark']}}_{{$v['trade_currency']['currency_mark']}}</td>
								<td class="text-right ">{{isset($trade[$key]['jiaoyinum'])?$trade[$key]['jiaoyinum']:0}}</td>
								<td class="text-right ">{{isset($trade[$key]['jiaoyiprice'])?$trade[$key]['jiaoyiprice']:0}}</td>
								<td class="text-right ">{{isset($trade[$key]['jiaoyiprice'])?$trade[$key]['jiaoyiprice']:0}}</td>
								<td class="text-right ">{{isset($trade[$key]['jiaoyiprice'])?$trade[$key]['jiaoyiprice']:0}}</td>
								<td class="text-right ">39666890.58940000</td>
								<td class="text-right ">1457810.50958020</td>
								<td class="text-right ">39666890.58940000</td>
								<td class="text-right ">1457810.50958020</td>
							</tr>
							@endforeach

						<tr>
							<th colspan="2" class="text-right ">合计</th>
							<td class="text-right " colspan="2"></td>
						</tr>

						</tbody>
					</table>
				</div>
			</div>
			<!--游戏统计-->
			<div style="overflow:hidden;">
				<div style="padding-bottom:10px; width:97%; clear:both; margin-left:15px;">
					<strong>
						游戏统计
					</strong>
					<table class="table table-hover table-striped table-bordered" style="width:100%;border: 1px solid #ddd;">
						<thead>
						<tr>
							<th class="text-center w-100px">币种</th>
							<th class="text-center w-200px">投注</th>
							<th class="text-center w-200px">奖金</th>

						</tr>
						</thead>
						<tbody>
						<tr>
							<td class="text-right ">VRC</td>
							<td class="text-right "></td>
							<td class="text-right "></td>

						</tr><tr>
							<td class="text-right ">CNY</td>
							<td class="text-right "></td>
							<td class="text-right "></td>

						</tr><tr>
							<td class="text-right ">FHG</td>
							<td class="text-right "></td>
							<td class="text-right "></td>

						</tr><tr>
							<td class="text-right ">NEC</td>
							<td class="text-right "></td>
							<td class="text-right "></td>

						</tr><tr>
							<td class="text-right ">BLK</td>
							<td class="text-right "></td>
							<td class="text-right "></td>

						</tr><tr>
							<td class="text-right ">BC</td>
							<td class="text-right "></td>
							<td class="text-right "></td>

						</tr>                    <tr>
							<th colspan="2" class="text-right ">合计</th>
							<td colspan="2" class="text-right "></td>
						</tr>

						</tbody>
					</table>
				</div>
			</div>
			<!--计算-->
			<div style="overflow:hidden;">
				<div style="padding-bottom:10px; width:97%; clear:both; margin-left:15px;">
					<strong>
						计算
					</strong>
					<table class="table table-hover table-striped table-bordered" style="width:100%;border: 1px solid #ddd;">
						<thead>
						<tr>
							<th class="warning">币种 </th>
						</tr>
						<tr>
							<th class="warning">充值量-提现量+买入量-卖出量+奖金-投注量-挂单量</th>
						</tr>
						<tr>
							<th class="warning">用户余额</th>
						</tr>
						</thead>
						<tbody>
						<tr>

							<td class="text-right ">VRC</td>
						</tr>
						<tr>

							<td class="text-right ">44706356.232455
							</td>
						</tr>
						<tr></tr><tr>

							<td class="text-right ">CNY</td>
						</tr>
						<tr>

							<td class="text-right ">3438487.9776789
							</td>
						</tr>
						<tr></tr><tr>

							<td class="text-right ">FHG</td>
						</tr>
						<tr>

							<td class="text-right ">299826
							</td>
						</tr>
						<tr></tr><tr>

							<td class="text-right ">NEC</td>
						</tr>
						<tr>

							<td class="text-right ">3249466
							</td>
						</tr>
						<tr></tr><tr>

							<td class="text-right ">BLK</td>
						</tr>
						<tr>

							<td class="text-right ">5209500.7747685
							</td>
						</tr>
						<tr></tr><tr>

							<td class="text-right ">BC</td>
						</tr>
						<tr>

							<td class="text-right ">14999152.9
							</td>
						</tr>
						<tr></tr>
						</tbody>
					</table>
				</div>
			</div>
			<div class="list-page"> <ul></ul></div>
		</div>

	</div>
	</div>

@endsection
@section('footer')
	<script>
		function pass(id){
			layer.confirm(
					'确定通过审核',
					{btn:['确定','取消']},
					function(){
						$.post("{:U('Pay/payUpdate')}",{"pay_id":id,"status":1},function(data){
							if(data.status==0){
								layer.msg(data['info']);
								setTimeout("location.reload()",2000);
							}else{
								layer.msg(data['info']);
								setTimeout("location.reload()",2000);
							}
						})
					}
			),
					function(){
						layer.msg('已取消');
					}
		}

		function fail(id){
			layer.confirm(
					'确定不通过审核',
					{btn: ['确定','取消'],},
					function(){
						//href="{:U('Pay/payUpdate',array('pay_id'=>$vo['pay_id'],'status'=>1))}
						$.post("{:U('Pay/payUpdate')}",{"pay_id":id,"status":2},function(data){
							if(data.status == 0){
								layer.msg(data['info']);
								setTimeout("location.reload()",2000);

							}else if(data.status == 2){
								layer.msg(data['info']);
								setTimeout("location.reload()",2000);
							}else{
								layer.msg(data['info']);
								setTimeout("location.reload()",2000);
							}
						})
					}
			),
					function(){
						layer.msg('已取消');
					}
		}
	</script>
	<script>
		$(".sub-menu").eq(11).show();
		$(".sub-menu").eq(11).children("li").eq(2).addClass("on");
	</script>
@endsection